package cn.tedu.store.controller;


import cn.tedu.store.common.ApiResult;
import cn.tedu.store.entity.dto.LisTestRegDto;
import cn.tedu.store.service.LisTestRegService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @BelongsProject: zhijiang_hesuan_test
 * @BelongsPackage: com.zhijiang.hospital.controller
 * @Author: JunFu
 * @CreateTime: 2022-08-28  18:53
 * @Description: 枝江四家医院已经疾控中心得核酸查询接口
 * @Version: 1.0
 */
@RestController
@RequestMapping("hesuan")
public class LisTestRegController {

    @Autowired
    LisTestRegService lisTestRegService;



    @PostMapping("findMyNucleicAcidResults")
    public ApiResult findMyNucleicAcidResults(@RequestBody LisTestRegDto lisTestRegDto){
        List<LisTestRegDto> list = lisTestRegService.findPeoplehospitalNucleicAcidResults(lisTestRegDto);
        return ApiResult.ok(list);
    }
    @PostMapping("findOtherNucleicAcidResults")
    public ApiResult findOtherNucleicAcidResults(@RequestBody LisTestRegDto lisTestRegDto){
        List<LisTestRegDto> otherResults = lisTestRegService.findOtherNucleicAcidResults(lisTestRegDto);
        return ApiResult.ok(otherResults);
    }

    @PostMapping("findNucleicAcidState")
    public ApiResult findNucleicAcidState(@RequestBody LisTestRegDto lisTestRegDto){
        return ApiResult.ok(lisTestRegService.findNucleicAcidState(lisTestRegDto));
    }

}
